﻿using Newtonsoft.Json;
using RXY_Mall.AdminApi.Common;

using RXY_Mall.Core;
using RXY_Mall.Data;
using RXY_Mall.Domain;
using RXY_Mall.Services;
using RXY_Mall.Services.Company;
using RXY_Mall.Services.Company.Dto;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Http;

namespace RXY_Mall.AdminApi.Controllers
{
    /// <summary>
    /// 公司接口
    /// </summary>
    [RoutePrefix("Company")]
    [ApiSecurityFilter]
    public class CompanyController : BaseApiController
    {
        public ICompanyService companyService;

        public CompanyController()
        {
            companyService = new CompanyService();
        }

        #region 公司
        /// <summary>
        /// 添加公司
        /// </summary>
        /// <param name="input">公司输入信息</param>
        [HttpPost]
        [Route("AddCompany")]
        public async Task<ResponseService<bool>> AddCompany(AddCompanyInput input)
        {
            return await companyService.AddCompany(input);
        }

        #endregion

    }
}
